<!--#include("_header.html")-->

<!--%import("../../editor/tpl/js/editor_admin.js")-->
<!--%import("../../addon/tpl/js/addon.js")-->
<!--%import("../../admin/tpl/js/admin.js")-->

<h2 class="h2">{$lang->cmd_admin_menus[$act]}</h2>
<div class="cnb">
<ul>
    <li class="on"><a href="#" viewObj="components" class="onOneObj">{$lang->editor}</a></li>
    <li><a href="#" viewObj="addons" class="onOneObj">{$lang->addon}</a></li>
</ul>
</div>
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
	<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>

<div id="components">
<p class="summary">{$lang->about_cafe_act[$act]}</p>
<form action="./" method="post" class="form" ruleset="componentOrderAndUse">
	<input type="hidden" name="act" value="procEditorAdminCheckUseListOrder" />
	<fieldset class="section">
		<div class="table even easyList">
			<table id="sortable_table" class="sortable"width="100%" border="1" cellspacing="0">
				<thead>
					<tr>
						<th scope="col">{$lang->cmd_move}</th>
						<th scope="col" class="title">{$lang->component_name}</th>
						<th scope="col">{$lang->author}</th>
						<th scope="col">{$lang->use}</th>
					</tr>
				</thead>
				<tbody class="uDrag">
					<!--@foreach($component_list as $component_name => $xml_info)-->
					<tr>
						<td><div class="wrap" style="height:80px"><button type="button" class="dragBtn">Move to</button></div></td>
						<td class="title">
							<input type="hidden" name="component_names[]" value="{$xml_info->component_name}" />
							<p><b>{$xml_info->title} {$xml_info->version}</b></p>
							<p>{nl2br($xml_info->description)}</p>
						</td>
						<td>
						   <!--@foreach($xml_info->author as $author)-->
							<a href="{$author->homepage}" target="_blank">{$author->name}</a>
							<!--@endforeach-->
						</td>
						<td><input type="checkbox" name="enables[]" id="enable" value="{$xml_info->component_name}" title="Use this component " <!--@if($xml_info->enabled=='Y')--> checked="checked"<!--@end--> /></td>
					</tr>
					<!--@end-->
				</tbody>
			</table>
		</div>
		<div class="btnArea">
			<span class="btn"><input type="submit" value="{$lang->cmd_save}" /></span>
		</div>
	</fieldset>
</form>
</div>
<div id="addons" style="display:none;">
<form action="./" method="post">
	<input type="hidden" name="module" value="addon" />
	<input type="hidden" name="act" value="procAddonAdminSaveActivate" />
	<input type="hidden" name="success_return_url" value="{getRequestUriByServerEnviroment()}" />

	<p>{$lang->about_installed_addon}</p>
	<div class="table even easyList">
		<table width="100%" border="1" cellspacing="0">
			<thead>
				<tr>
					<th scope="col" class="title">{$lang->addon_name}</th>
					<th scope="col">{$lang->author}</th>
					<th scope="col">{$lang->cmd_setup}</th>
					<th scope="col">PC</th>
					<th scope="col">Mobile</th>
				</tr>
			</thead>
			<tbody>
				<tr loop="$addon_list => $addon">
					<td class="title">
						<p><strong>{$addon->title} {$addon->version}</strong></p>
						<p>{$addon->description}</p>
					</td>
					<td>
						<block loop="$addon->author => $author">
							<a cond="$author->homepage" href="{$author->homepage}" target="_blank">{$author->name}</a>
							<block cond="!$author->homepage">{$author->name}</block>
						</block>
					</td>
					<td><a href="{getUrl('act', 'dispAddonAdminSetup', 'selected_addon', $addon->addon)}">{$lang->cmd_setup}</a></td>
					<td><input type="checkbox" name="pc_on[]" title="PC" value="{htmlspecialchars($addon->addon_name)}" checked="checked"|cond="$addon->activated" /></td>
					<td><input type="checkbox" name="mobile_on[]" title="Mobile" value="{htmlspecialchars($addon->addon_name)}" checked="checked"|cond="$addon->mactivated" /></td>
				</tr>
			</tbody>
		</table>
	</div>
	<div class="btnArea">
		<span class="btn medium"><input type="submit" value="{$lang->cmd_save}" /></span>
	</div>
</form>
</div>

<!--#include("_footer.html")-->
